﻿#ifndef PCMONITOR_H
#define PCMONITOR_H

#include <QObject>
#include <QtNetwork/QUdpSocket>
#include <QJsonObject>
class ServerUdpMonitor : public QObject
{
    Q_OBJECT
public:
    explicit ServerUdpMonitor(QObject *parent = 0);
    ~ServerUdpMonitor();
    ServerUdpMonitor(QHostAddress LocalAddr,int LocalPort);
public:

private:
    QUdpSocket   *pUDPListener;

signals:
    void sig_ServerCommandReady(QJsonObject);        //    服务器命令解析完成，可以读取


public slots:
    void slot_ReceiveDataFromServer();            //    监测到服务器有命令传来

};


#endif // PCMONITOR_H
